<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>POS收单运营管理平台</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link href="<s:url value="/css/a.css"/>" type="text/css"
	rel="stylesheet" />
<link href="<s:url value="/css/index.css"/>" type="text/css"

	rel="stylesheet" />
	
<script type="text/javascript"
	src="<c:url value="/js/jquery-1.3.2.js" />"></script>
<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>

<style>
　　　
a{
	text-decoration: none
}

a:link{
text-decoration:none;
}
a:visited{
text-decoration:none;
}
a:hover{
text-decoration:none;
}
a:active{
text-decoration:none;
}
　　


　　　
</style>

<script type="text/javascript">

	$(document).ready(
			function() {
			
			
			});

	function addpanel(id,title,html) {
				window.parent.parent.document.getElementById("framemain").contentWindow.addtabs(id,title,html);
			}
</script>



</head>

<body>

	<div class="subpage">
		<s:form id="queryUserForm" action="/terminalList/queryTerminalSN.ct" method="post"
			theme="simple">
			<s:hidden name="queryFlag" id = "queryFlag" value="1"></s:hidden>
			
			<table width="100%" cellpadding="0" cellspacing="0" border="0"
				class="query_table">

				<tr>
					<td colspan="6" align="center">
						<h2 class="headline-inquires">
							终端冻结/解冻<br />
							<span class="sub-title"></span>
						</h2>

					</td>
				</tr>


				<tr>
					<td colspan="6">&nbsp;</td>
				</tr>

				<tr>
                <td align="right" width="15%">所属机构：</td>
						<td>
							
							<s:select cssClass="queryWidth" name="searchCondition.orgCode"
								id="orgCode"
								list="#request.orgList" listKey="org_code" listValue="org_name" />
								
						</td>
				
						<td align="right">商户名称：</td>
						<td align="left" colspan="1"><s:textfield id="merchantName"
								name="searchCondition.merchantName" cssClass="queryWidth" /></td>
						<td align="right">商户号：</td>
						<td align="left" colspan="1"><s:textfield id="merchantNo"
								name="searchCondition.merchantNo" cssClass="queryWidth" /></td>
						
				</tr>
				
				<tr>
				       <td align="right">状态</td>
					   <td align="left" colspan="1">
						 <s:select id="flag"  name="searchCondition.flag" list="#{'1':'正常','0':'未开通','02':'已冻结'}" headerKey="" headerValue="--不限--" cssClass="queryWidth" /> 
		               </td>
                
						<td align="right">终端号：</td>
						<td align="left" colspan="5"><s:textfield id="tid"
								name="searchCondition.tid" cssClass="queryWidth" /></td>
								
								
								
						
				</tr>
				
				<tr>
						<td colspan="6" align="center"><span style="font-color: red"><s:actionerror /></span>
							<span style="font-color: red;"><s:actionmessage /></span > <span style="font-color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
					</tr>
				<tr>
					<td colspan="6" align="right"><s:submit value="查   询" />
						&nbsp;&nbsp;&nbsp;&nbsp; <s:reset value="取  消" />&nbsp;&nbsp;&nbsp;&nbsp; </td>
				</tr>
				
				<tr>
					<td colspan="6">&nbsp;</td>
				</tr>
			</table>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">

				<tr>
					<td colspan="6" align="center">
						<h2 class="headline-inquires">终端信息列表</h2>

					</td>
				</tr>
				<s:if
					test="#request.searchRsList != null && #request.searchRsList.size>0">
					<tr>
						<td align="left">&nbsp;&nbsp;&nbsp;&nbsp; <page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/terminalList/queryTerminalSN.ct?currentPage=" />

						</td>
					</tr>
				</s:if>
			</table>
		</s:form>
			<table id="tableList" width="100%" class="table">
				<thead>
					<tr>
					    <th>机构名称</th>
						<th>商户名称</th>
						<th>商户号</th>
						<th>门店名称</th>
						<th>终端号</th>
						<th>终端类型</th>
						<th>终端状态</th>
						<th>终端序列号</th>
						<th>绑定状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="#request.searchRsList" status="stat" id="term">
							<tr class="<s:if test="#stat.index%2==0">tr_0</s:if>" >
							<td>
							 <s:property value="#term.orgCode"/>
							</td>
							<td>
							 <s:property value="#term.midName"/>
							</td>
							<td>
							 <s:property value="#term.mid"/>
							</td>
							<td>
							 <s:property value="#term.tidName"/>
							</td>
							<td>
							 <s:property value="#term.terTid"/>
							</td>
							<td>
							 <s:property value="#term.tidKind"/>
							</td>
							<td>
							 <s:property value="#term.flagName"/>
							</td>
							<td>
							 <s:property value="#term.serialNum"/>
							</td>
							<td>
							 <s:property value="#term.status"/>
							</td>
							<td>
							<s:if test="#term.flag == 1">
								<a href="javascript:addpanel('','终端冻结','<%=basePath %>terminalSn/terminalSnJsp.ct?tid=<s:property value='#term.terTid'/>&mid=<s:property value='#term.mid'/>')">冻结</a>
							</s:if>
							<s:if test="#term.flag == 2">
								<a href="javascript:addpanel('','终端解冻','<%=basePath %>terminalSn/terminalSnJsp.ct?tid=<s:property value='#term.terTid'/>&mid=<s:property value='#term.mid'/>')">解冻</a>
							</s:if>
							</td>
							</tr>
						</s:iterator>
				</tbody>
			</table>
	</div>
	<s:if test="#request.msg !=null">
		<script language="javascript">
			alert("${request.msg}");
		</script>
	</s:if>
</body>
</html>
